package com.miyake.server.dsaccess;

import javax.jdo.PersistenceManager;

import com.miyake.server.DsNode;
import com.miyake.server.PMF;

public class GetNode {

	public DsNode getByKey(String key) {
		PersistenceManager pm = PMF.get().getPersistenceManager();
		DsNode node = null;
		try {
			node = pm.getObjectById(DsNode.class, key);
			update(node);
		}
		catch (Exception e) {
			e.printStackTrace();
		}
		finally {
			pm.close();
		}
		return node;
	}

	protected void update(DsNode node) {}
}
